package Logic;

import java.awt.Color;
import java.awt.Graphics;
import java.util.ArrayList;

import javax.swing.JPanel;

import Gui.frontend_main;

public class CircleDraw extends JPanel {
	
	Graphics g;

	  public CircleDraw () { 
	    // Set background color for the applet's panel. 
		//setBackground (Color.WHITE);
	  }
  
//	  public void paintComponent(Graphics g)
//	  {
//		  super.paintComponent(g); 
//		  System.out.println("Test");
//		  g.setColor (Color.BLUE);
//		  g.fillOval (50, 50, 
//	               50, 50);
//	  }
	  
	  public void paintBalls(Graphics g, ArrayList<Ball> balls)
	  {
		  //System.out.println("Painting Balls");
		  frontend_main.consoleArea.append("Painting Balls\n");
		  
		  for(int x = 0; x < balls.size(); x++ )
		  {
			  //Removed due to JlAbel Transition
			  //Ball b = balls.get(x);
			  //g.setColor (b.getColor());
			  //g.fillOval (b.getX(), b.getY(), 
		      //         50, 50);
			  //g.setColor (Color.white);
			  //g.drawString(b.getText(), b.getX()+13, b.getY()+30);
		  }
		  
	  }
	  
	  public void clearBalls(Graphics g)
	  {
		  frontend_main.consoleArea.append("Clearing Balls\n");
		  super.paintComponents(g);
	  }
	  
//	  public void paintComponent(Graphics g, Ball b)   { 
//	   // Paint background
//	   super.paintComponent(g); 
//
//	   // Get the drawing area 
//	   int dy = getSize().height;
//	   int dx = getSize().width;
//	   int mid_y = dy/2;
//	   int mid_x = dx/2;
//	   int rect_x = 3 * dx/4;
//	   int rect_y = 3 * dy/4;
//
//	   // Set current drawing color
//	   g.setColor (Color.BLUE);
//
//	   // Draw a circle around the mid-point
//	   g.fillOval (mid_x-rect_x/5, mid_y-rect_y/5, 
//	               50, 50);
//	   g.setColor (Color.WHITE);
//	   g.drawString("(0,0)", mid_x-rect_x/5+13, mid_y-rect_y/5+25);
//	   
//	   // Set current drawing color
//	   g.setColor (Color.BLUE);
//
//	   // Draw a circle around the mid-point
//	   g.fillOval (mid_x-rect_x/5+50, mid_y-rect_y/5, 
//	               50, 50);
//	   g.setColor (Color.WHITE);
//	   g.drawString("(0,0)", mid_x-rect_x/5+63, mid_y-rect_y/5+25);
//	  } // paintComponent

	} // class DrawingPanel
